package com.qyc.Microservice.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.qyc.Microservice.dto.pojo.User;

public interface UserMapper {

	@Insert("insert into user(age,name,password,sex) values (#{age},#{name},#{password},#{sex})")
	public void insert(User user);
	
	@Update("update user set name=#{name},age=#{age},password=#{password},sex=#{sex} where id=#{id}")
	public int update(User user);
	
	@Delete("delete from user where id=#{id}")
	public int delete(User user);
	
	@Select("select * from user where name = #{name} and password =#{password}")
	public User select(User user);
	
	public User getUserByName2(@Param("tableName") String TableName,@Param("name") String name,@Param("age")Integer age);
	
	public User getUserByName3(User user);

}
